<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            display: flex;
            /* justify-content: flex-start;  */
            /* 默认值，弹性盒子从起点开始依次排列 */

            /* justify-content: end; */
            /* 弹性盒子终点开始一次排列 */

            /* justify-content: center; */
            /* 弹性盒子沿主轴居中排列 */

            /* justify-content: space-between; */
            /* 弹性盒子沿主轴均匀排列，空白间距分在弹性盒子中间 */

            /* justify-content: space-around; */
            /* 弹性盒子沿主轴均匀排列，空白间距均分在弹性盒子两侧 */

            /* justify-content: space-evenly; */
            /* 弹性盒子沿主轴均匀排列，弹性盒子与容器之间间距相等 */

            /* align-items: stretch;    */
            /* 弹性盒子沿着侧轴线被拉伸至铺满容器（弹性盒子不得设置侧轴方向尺寸则默认拉伸） */

            /* align-items: center; */
            /* 弹性盒子沿侧轴居中排列 */

            /* align-items: flex-start; */
            /* 弹性盒子从起点开始依次排列 */

            align-items: end;
            /* /* 弹性盒子从终点开始依次排列 */

            height: 300px;
            border: 1px solid #000;
        }

        /* 设置第二个div盒子侧轴居中对齐 */
        .box div:nth-child(2){
            align-self: center;
        }
        .box div{
            width: 200px;
            height: 100px;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </div>
</body>
</html>